import request from '@/utils/request'

// 案件列表
export function caseLists(params?: Record<string, any>) {
    return request.get({ url: '/case/list', params })
}

// 导出案件列表
export function exportList(params?: Record<string, any>) {
    // return request.post({ url: '/case/exportList', params })
    return request.post(
        {responseType: 'blob', url: '/case/exportList', params},
        {
            isTransformResponse: false
        }
    )
}

// 案件详情
export function caseDetail(params: Record<string, any>) {
    return request.get({ url: '/case/detail', params })
}

// 案件新增
export function caseAdd(params: Record<string, any>) {
    return request.post({ url: '/case/add', params })
}

// 案件编辑
export function caseEdit(params: Record<string, any>) {
    return request.post({ url: '/case/edit', params })
}

// 案件删除
export function caseDelete(params: Record<string, any>) {
    return request.post({ url: '/case/del', params })
}

//
export function isShow(params: Record<string, any>) {
    return request.post({ url: '/case/isShow', params })
}

export function canTake(params: Record<string, any>) {
    return request.post({ url: '/case/canTake', params })
}
